import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  // 五个标签页
  {
    path: '/',
    name: 'index',
    component: () => import('../views/index.vue'),
    redirect: '/Composite', //默认打开
    children: [

      {
        path: '/Composite',
        name: '综合管理',
        component: () => import('../views/Composite.vue')
      },
      {
        path: '/Vehicle',
        name: '道路机扫',
        component: () => import('../views/Vehicle.vue')
      },
      {
        path: '/Rubbish',
        name: '垃圾收运',
        component: () => import('../views/Rubbish.vue')
      },
      {
        path: '/Worker',
        name: '人工保洁',
        component: () => import('../views/Worker.vue')
      },
      {
        path: '/Wc',
        name: '公厕维保',
        component: () => import('../views/Wc.vue')
      },
    ]
  },
  // 单独页面

  {
    path: '/indexVehicle',
    name: '道路机扫',
    component: () => import('../views/indexVehicle.vue')
  },
  {
    path: '/indexRubbish',
    name: '垃圾收运',
    component: () => import('../views/indexRubbish.vue')
  },
  {
    path: '/indexWorker',
    name: '人工保洁',
    component: () => import('../views/indexWorker.vue')
  },
  {
    path: '/indexWc',
    name: '公厕维保',
    component: () => import('../views/indexWc.vue')
  },
]
const router = new VueRouter({
  routes
})

export default router